<template>
  <div>
    <a-pagination
      :show-total="total => `共 ${total} 件设备`"
      v-model="current"
      :total="160"
      :defaultPageSize="16"
      :item-render="itemRender"
      @change="pagechangeFn"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props:{
      total:{
          type:Number,
          requried
      }
  },
  methods: {
    itemRender(current, type, originalElement) {
      if (type === "prev") {
        return <a>上一页</a>;
      } else if (type === "next") {
        return <a>下一页</a>;
      }
      return originalElement;
    },
    pagechangeFn(page, pageSize) {
      // console.log(page, pageSize);
    },
  },
  mounted() {},
};
</script>

<style scoped lang="scss">
::v-deep .ant-pagination-total-text {
  color: rgba(255, 255, 255, 0.7);
}
</style>